Fix bug in the state cache mechanism. Remove 'BOD "strategy". Refactor.
authorAlan Mackenzie <acm@muc.de>
Sat, 2 Feb 2013 18:24:10 +0000 (18:24 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 2 Feb 2013 18:24:10 +0000 (18:24 +0000)
commit5fe3e9418196032b8c86183568ba77de3c626036
tree706b55ecb202a1045ba32e79ca8565b5465562ac
parenta0096110c41c1a20d6bac0e5023e3dc098461734
Fix bug in the state cache mechanism.  Remove 'BOD "strategy".  Refactor.
cc-engine.el (c-get-fallback-scan-pos): Remove.
(c-parse-state-get-strategy): Don't return 'BOD any more.
(c-append-lower-brace-pair-to-state-cache): Extra parameter HERE instead
of narrowing.  Widen to top of buffer before searching backwards for a
brace pair.
(c-state-push-any-brace-pair): Add HERE parameter to function call.
(c-append-to-state-cache): Extra parameter HERE in place of narrowing.
Narrow to parameter HERE, in place of being called narrowed.
(c-remove-stale-state-cache): Extra parameter HERE in place of narrowing.
Check there's an open brace in the cache before searching for its match.
(c-invalidate-state-cache-1): Add HERE parameter to function call.
(c-parse-state-1): Don't narrow here for 'forward strategy, instead
passing extra parameter HERE to several functions.  Remove 'BOD strategy.
lisp/ChangeLog
lisp/progmodes/cc-engine.el